<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>コントロールパネル</title>

		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<link rel="stylesheet" type="text/css" href="./assets/styles/tablesorter.css" />

		<script src="assets/scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		
		<script type="text/javascript">
		$(function() {

			// メッセージのフェード
			$('.message').fadeIn("slow");

			// 印刷画面を開く
			$('.btn_preview').click(function(){
				var url = './preview/shipping.php?id=' + {{ $forms.id }};
				window.open(url, 'printpreview');
			});

			// コピーして新規作成
			$('.btn_copy').click(function(){
				var url = './ship_form.php?id=' + {{ $forms.id }} + '&mode=copy';
				document.location = url;
			});

			// 更新
			$('.btn_edit').click(function(){
				var url = './ship_form.php?id=' + {{ $forms.id }};
				document.location = url;
			});

		});
		</script>
	</head>
	<body id="">
{{ php }} include( MENU_FILE ); {{ /php }}
		<div id="header" class="clearfix"><div class="wrapper">
			<h1><a href="./">コントロールパネル</a></h1>
			<form id="form_logout" action="logout.php" method="post"><p>{{ $login.staff_name }} <input type="submit" id="button_logout" value="ログアウト" /></p></form>
		</div></div>

		<div id="container"><div class="wrapper">

			<h2>サンプル依頼</h2>

			<ul class="submenu clearfix">
				<li><a href="sample_index.php">サンプル依頼書一覧</a></li>
				<li><a href="sample_form.php">サンプル依頼書登録</a></li>
				<li><a href="ship_index.php">無償出荷一覧</a></li>
				<li><a href="ship_form.php">無償出荷登録</a></li>
				<li><a href="products_index.php">商品マスタ</a></li>
			</ul>


			<h3>無償出荷参照</h3>

				<p class="button">
					<button type="button" id="btn_preview" class="submit btn_preview"><span>印刷画面</span></button>
					<button type="button" id="btn_copy" class="submit btn_copy"><span>コピーして新規作成</span></button>
					<button type="button" id="btn_edit" class="submit btn_edit"><span>更新</span></button>
				</p>

				<table class="formTable">

					<tbody>
						<tr>
							<th>ID</th>
							<td>{{ $forms.disp_id }}</td>
							<th>登録日</th>
							<td>{{ $forms.r_date }}</td>
						</tr>
						<tr>
							<th>依頼者名</th>
							<td>{{ $forms.request_name }}</td>
							<th>更新日</th>
							<td>{{ $forms.u_date }}</td>
						</tr>

					</tbody>
				</table>

				<table id="inquiry_result" class="sortable">
					<thead>
						<tr>
							<th class="nosort"><h3>No.</h3></th>
							<th class="nosort"><h3>製品番号/品名</h3></th>
							<th class="nosort"><h3>伝票区分</h3></th>
							<th class="nosort"><h3>数量</h3></th>
							<th class="nosort"><h3>単位</h3></th>
							<th class="nosort"><h3>出庫元</h3></th>
							<th class="nosort"><h3>材料費</h3></th>
							<th class="nosort"><h3>目的/備考</h3></th>
						</tr>

					</thead>
					<tbody>
						<tr>
							<td>1</td>
							<td class="prodName">{{ $forms.pro_name[1]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.1] }}</td>
							<td>{{ $forms.amount[1] }}</td>
							<td>{{ $forms.unit[1] }}</td>
							<td>{{ $forms.from[1] }}</td>
							<td class="subTotal">{{ $subtotal[1] }}</td>
							<td>{{ $forms.biko[1]|escape }}</td>
						</tr>

						<tr>
							<td>2</td>
							<td class="prodName">{{ $forms.pro_name[2]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.2] }}</td>
							<td>{{ $forms.amount[2] }}</td>
							<td>{{ $forms.unit[2] }}</td>
							<td>{{ $forms.from[2] }}</td>
							<td class="subTotal">{{ $subtotal[2] }}</td>
							<td>{{ $forms.biko[2]|escape }}</td>
						</tr>

						<tr>
							<td>3</td>
							<td class="prodName">{{ $forms.pro_name[3]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.3] }}</td>
							<td>{{ $forms.amount[3] }}</td>
							<td>{{ $forms.unit[3] }}</td>
							<td>{{ $forms.from[3] }}</td>
							<td class="subTotal">{{ $subtotal[3] }}</td>
							<td>{{ $forms.biko[3]|escape }}</td>
						</tr>

						<tr>
							<td>4</td>
							<td class="prodName">{{ $forms.pro_name[4]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.4] }}</td>
							<td>{{ $forms.amount[4] }}</td>
							<td>{{ $forms.unit[4] }}</td>
							<td>{{ $forms.from[4] }}</td>
							<td class="subTotal">{{ $subtotal[4] }}</td>
							<td>{{ $forms.biko[4]|escape }}</td>
						</tr>

						<tr>
							<td>5</td>
							<td class="prodName">{{ $forms.pro_name[5]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.5] }}</td>
							<td>{{ $forms.amount[5] }}</td>
							<td>{{ $forms.unit[5] }}</td>
							<td>{{ $forms.from[5] }}</td>
							<td class="subTotal">{{ $subtotal[5] }}</td>
							<td>{{ $forms.biko[5]|escape }}</td>
						</tr>

						<tr>
							<td>6</td>
							<td class="prodName">{{ $forms.pro_name[6]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.6] }}</td>
							<td>{{ $forms.amount[6] }}</td>
							<td>{{ $forms.unit[6] }}</td>
							<td>{{ $forms.from[6] }}</td>
							<td class="subTotal">{{ $subtotal[6] }}</td>
							<td>{{ $forms.biko[6]|escape }}</td>
						</tr>

						<tr>
							<td>7</td>
							<td class="prodName">{{ $forms.pro_name[7]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.7] }}</td>
							<td>{{ $forms.amount[7] }}</td>
							<td>{{ $forms.unit[7] }}</td>
							<td>{{ $forms.from[7] }}</td>
							<td class="subTotal">{{ $subtotal[7] }}</td>
							<td>{{ $forms.biko[7]|escape }}</td>
						</tr>

						<tr>
							<td>8</td>
							<td class="prodName">{{ $forms.pro_name[8]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.8] }}</td>
							<td>{{ $forms.amount[8] }}</td>
							<td>{{ $forms.unit[8] }}</td>
							<td>{{ $forms.from[8] }}</td>
							<td class="subTotal">{{ $subtotal[8] }}</td>
							<td>{{ $forms.biko[8]|escape }}</td>
						</tr>

						<tr>
							<td>9</td>
							<td class="prodName">{{ $forms.pro_name[9]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.9] }}</td>
							<td>{{ $forms.amount[9] }}</td>
							<td>{{ $forms.unit[9] }}</td>
							<td>{{ $forms.from[9] }}</td>
							<td class="subTotal">{{ $subtotal[9] }}</td>
							<td>{{ $forms.biko[9]|escape }}</td>
						</tr>

						<tr>
							<td>10</td>
							<td class="prodName">{{ $forms.pro_name[10]|escape }}</td>
							<td>{{ $arr_denpyo[$forms.denpyo.10] }}</td>
							<td>{{ $forms.amount[10] }}</td>
							<td>{{ $forms.unit[10] }}</td>
							<td>{{ $forms.from[10] }}</td>
							<td class="subTotal">{{ $subtotal[10] }}</td>
							<td>{{ $forms.biko[10]|escape }}</td>
						</tr>

						<tr>
							<td colspan="4"></td>
							<th colspan="2">材料費合計</th>
							<td>{{ $all_total }}</td>
							<td></td>
						</tr>
					</tbody>
				</table>

				<table class="formTable">

					<tbody>
						<tr>
							<th>郵便番号</th>
							<td>{{ $forms.zipcode }}</td>
						</tr>

						<tr>
							<th>住所</th>
							<td>{{ $forms.address|escape }}</td>
						</tr>

						<tr>
							<th>電話番号</th>
							<td>{{ $forms.tel }}</td>
						</tr>

						<tr>
							<th>会社名</th>
							<td>{{ $forms.company|escape }}</td>
						</tr>

						<tr>
							<th>部署</th>
							<td>{{ $forms.division|escape }}</td>
						</tr>

						<tr>
							<th>氏名</th>
							<td>{{ $forms.cust_name|escape }}</td>
						</tr>

						<tr>
							<th>希望納期</th>
							<td>{{ $forms.limit_date }}</td>
						</tr>

						<tr>
							<th>午前中指定</th>
							<td>{{ $specify[$forms.specify] }}</td>
						</tr>

						<tr>
							<th>備考</th>
							<td>{{ $forms.memo|nl2br }}</td>
						</tr>
					</tbody>
				</table>

				<table class="formTable">

					<tbody>
						<tr>
							<th>フォロー結果</th>
							<td>
								{{ $arr_result[$forms.follow_result] }}
							</td>
						</tr>
						<tr>
							<th>フォロー1</th>
							<td>
								{{ $forms.follow_date1 }}<br />
								{{ $forms.follow_text1 }}
							</td>
						</tr>
						<tr>
							<th>フォロー2</th>
							<td>
								{{ $forms.follow_date2 }}<br />
								{{ $forms.follow_text2 }}
							</td>
						</tr>
					</tbody>
				</table>

				<p class="button">
					<button type="button" id="btn_preview" class="submit btn_preview"><span>印刷画面</span></button>
					<button type="button" id="btn_copy" class="submit btn_copy"><span>コピーして新規作成</span></button>
					<button type="button" id="btn_edit" class="submit btn_edit"><span>更新</span></button>
				</p>

		</div></div>
		<address>Copyright (C) SHIFT Inc. / All rightes reserved</address>
	</body>

</html>